jContractor: A Reflective Java Library to Support Design by Contract

نویسندگان

  • Murat Karaorman
  • Urs Hölzle
  • John L. Bruno
چکیده

jContractor is a purely library based approach to support Design By Contract specifications such as preconditions, postconditions, class invariants, and recovery and exception handling in Java. jContractor uses an intuitive naming convention, and standard Java syntax to instrument Java classes and enforce Design By Contract constructs. The designer of a class specifies a contract by providing contract methods following jContractor naming conventions. jContractor uses Java Reflection to synthesize an instrumented version of a Java class by incorporating code that enforces the present jContractor contract specifications. Programmers enable the run-time enforcement of contracts by either engaging the jContractor class loader or by explicitly instantiating objects using the jContractor object factory. Programmers can use exactly the same syntax for invoking methods and passing object references regardless of whether contracts are present or not. Since jContractor is purely library-based, it requires no special tools such as modified compilers, modified JVMs, or pre-processors.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

jContractor: Introducing Design-by-Contract to Java Using Reflective Bytecode Instrumentation

Design by Contract is a software engineering practice that allows semantic information to be added to a class or interface to precisely specify the conditions that are required for its correct operation. The basic constructs of Design by Contract are method preconditions and postconditions, and class invariants. This paper presents a detailed design and implementation overview of jContractor, a...

متن کامل

jContractor: Bytecode Instrumentation Techniques for Implementing Design by Contract in Java

Design by Contract is a software engineering practice that allows semantic information to be added to a class or interface to precisely specify the conditions that are required for its correct operation. The basic constructs of Design by Contract are method preconditions and postconditions, and class invariants. This paper presents a detailed design and implementation overview of jContractor, a...

متن کامل

An Aspect-Oriented Infrastructure for Design by Contract in Java

Design by Contract was first introduced in the Eiffel programming language to address the reliability concern in Object-Oriented Software Development, namely on module interaction. On the other hand, Aspect-Oriented Software Development aims at providing a means to identify, modularise and compose cross-cutting concerns, which classical approaches for software development can not modularise. Th...

متن کامل

Reflective Constraint Management for Languages on Virtual Platforms

Extending an object-oriented type system with assertions makes it possible for programs using reflection to rely on semantic information to ensure correct use of discovered types. Using extended reflective capabilities to access assertions in (dynamically) loaded class objects allows a variety of general and flexible verification techniques. The XVP (Extended Virtual Platform) implements these ...

متن کامل

Reflective designs

We render runtime system adaptations by design-level concepts such that running systems can be adapted and examined at a higher level of abstraction. The overall idea is to express design decisions as applications of design operators to be carried out at runtime. Design operators can implement design patterns for use at runtime. Applications of design operators are made explicit as design eleme...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999